home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Graphics / TVPaint / Rexx / LineBeam.rx < prev    next >
Encoding:
Text File  |  1995-11-07  |  398 b   |  32 lines

  1. /*
  2.     param line
  3.  
  4.     Draw a beam of lines
  5.     Modify n: the number of lines drawn
  6.  
  7. */
  8.  
  9. address 'rexx_TVPaint'
  10.     
  11.     parse ARG m x1 y1 x2 y2 b
  12.     if(m~='Line')then
  13.     do
  14.         tv_warn 'I need LINE parameters'
  15.         exit
  16.     end
  17.  
  18.     n=30
  19.  
  20.     tv_UpdateUndo
  21.  
  22.     tv_line x1 y1 x2 y2
  23.     do i=1 to n
  24.         w=(abs(x2-x1)+abs(y2-y1))%4
  25.         a=random(1,w*2,time('S'))
  26.         a=a-w
  27.         b=random(1,w*2,time('S'))
  28.         b=b-w
  29.         tv_line x1+a y1+b x2+a y2+b
  30.     end
  31.  
  32.